﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;

namespace HelixSoftware.Azure.Data
{
    [Serializable()]
    public abstract class DataObjectCollection<T> : Collection<T> where T : DataObject
    {
        #region Properties

        public bool IsChanged
        {
            get
            {
                foreach (var child in this)
                {
                    if (child.IsChanged)
                    {
                        return true;
                    }
                }

                return false;
            }
        }

        #endregion

        #region Constructors

        protected DataObjectCollection()
        {
        }

        #endregion
    }
}
